package com.bo.ioc.repo;

import com.bo.ioc.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

@Repository
public class UserRepo1 {
    public UserInfo userInfo;
    @Autowired //若只有一个构造方法,可以省略
    public UserRepo1(@Qualifier("userInfo1") UserInfo userInfo){
        this.userInfo = userInfo;
    }
    public void run(){
        System.out.println("User Repo...");
    }
    public void thoRun(){
        System.out.println(userInfo);
    }
}
